package com.company.project.modular.system.model.warpper;

import com.company.project.core.base.warpper.BaseControllerWarpper;

import java.util.List;
import java.util.Map;

/**
 * 标准物质的包装类
 *
 * @author lsf
 * @date 2018年10月31日 上午10:47:03
 */
public class StandardWarpper extends BaseControllerWarpper {

    public StandardWarpper(List<Map<String, Object>> list) {
        super(list);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {
/*标准物质类别*/
        if(map.get("standardType")==null) {
            map.put("standardType", " 无");
        }else{
            if ("1".equals(map.get("standardType").toString())) {
                map.put("standardType", "标准物质");
            } else {
                map.put("standardType", "对照品");
            }
        }
/*是否过期*/
        if(map.get("standardPeriodYn")==null) {
            map.put("standardPeriodYn", "未知期限");
        }else{
            if ("1".equals(map.get("standardPeriodYn").toString())) {
                map.put("standardPeriodYn", "未过期");
            } else {
                map.put("standardPeriodYn", "已过期");
            }
        }

    }

}
